<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<html:html>
<head>
<META http-equiv=Pragma content=no-cache>
<META http-equiv=Cache-Control content=no-cache>
<META http-equiv=Expires content=0>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="../../style/css/style.css" type="text/css">
<script language="javascript" type="text/javascript" src="../../style/scripts/util.js"></script>
<script language="javascript1.2">
function callFunTree(){
	var url = '<%=request.getContextPath()%>/pages/tree/treeList.jsp?formName=F0903ActionForm&isBox=1&isRadio=1&className=Function&treeName=上级功能点树&isLeaf=0&backBm=PARENTID&backMc=PARENTNAME';
//	alert(url);
	callNewWindow(url,'_blank','430','350');
}

function operation1(){
	if(validateActionForm(document.forms[0])){
	   if(document.forms[0].XH.value.length>0 && !isAllDigits(document.forms[0].XH.value)){
			alert("显示顺序必须为数字!");
			document.forms[0].XH.value="";
			document.forms[0].XH.focus();
			return;
	   }
		window.document.forms[0].operationType.value = "submit";
		window.document.forms[0].submit();		   
	}
}

function ShowFormTitle(strTitle){
	document.write("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"height:26px; background-position: left bottom; background-image: url(../../style/images/FormTitle_A_4.gif); background-repeat: repeat-x;\">");
	document.write("  <tr >");
	document.write("	<td style=\"width:5px; background-position: left bottom; background-image: url(../../style/images/FormTitle_A_1.gif); background-repeat: no-repeat;\">&nbsp;&nbsp;&nbsp;</td>");
	document.write("	<td class=\"FormTitle\" style=\"width:100%; padding-left:5px; padding-top:3px; background-position: left bottom; background-image: url(../../style/images/FormTitle_A_2.gif); background-repeat: no-repeat;\">");
	document.write("		<span id=\"spanFormTitle\" class=\"SpanTitle\">"+ strTitle +"</span>");
	document.write("	</td>");
	document.write("	<td style=\"width:5px; background-position: right bottom; background-image: url(../../style/images/FormTitle_A_3.gif); background-repeat: no-repeat;\">&nbsp;&nbsp;&nbsp;</td>");
    document.write("  </tr>");
	document.write("</table>");
}	
</script>
</head>

<body marginheight="0" marginwidth="0" bottommargin="0" topmargin="0">
<html:form method="post" action="/pages/F09/F0903.do" enctype="multipart/form-data">
<html:hidden property="operationType"/>
<html:hidden property="PARENTID"/>
<html:hidden property="FUNCTIONID" name="F0903ActionForm"/>
<!--Begin：表单标题-->
<div class="DivBlock">
	<script language="javascript" type="text/javascript">
		ShowFormTitle("请输入功能信息");
	</script>
</div>
<!--End：表单标题-->
<!--Begin：表单折叠区块1-->
<div class="DivBlock">
<div class="DivWrap">
  <table  WIDTH="81%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
	<tr>
		<td width="12%" align="center">代&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码</td>
		<td width="38%" ><html:text property="CODE" styleClass="MyText" maxlength="50" /></td>
		<td width="12%" align="center">名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称</td>
		<td width="38%" ><html:text property="NAME" styleClass="MyText" maxlength="50" /></td>
	</tr>
	<tr>	
		<td width="12%" align="center">上级功能点</td>
		<td width="38%"><html:text property="PARENTNAME" styleClass="MyTextReadOnly" readonly="true" onclick="javascript:callFunTree();"/></td>
		<td width="12%" align="center">显&nbsp;&nbsp;示&nbsp;&nbsp;顺&nbsp;&nbsp;序</td>
		<td width="38%" ><html:text property="XH" styleClass="MyText" maxlength="50" /></td>				
	</tr>
	<tr>
		<td align="center">链&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;接</td>
		<td colspan="3"><html:text property="URL" styleClass="MyText" maxlength="50" /></td>
	</tr>
	<tr>
		<td align="center">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</td>
		<td colspan="3"><html:textarea property="NOTES" cols="74" rows="5" styleClass="MyArea"/></td>
	</tr>
  </table>
</div>
</div>
<!--End：表单折叠区块1-->
<div class="DivBlock">
<div class="DivButton">
  <input type="button" name="Submit1" class="MyButton" value="保存" onClick="javascript:operation1();">
  <input type="button" name="Submit1" class="MyButton" value="返回" onClick="javascript:operation('back');">
</div>
</div>
<html:messages id="aa" message="true"><bean:message key="errors.prefix"/><bean:write name="aa"/><bean:message key="errors.suffix"/></html:messages>
</html:form>
</body>
<script language="Javascript1.2" type="text/javascript">
	function validateActionForm(form) { 
		return validateMinLength(form)&&validateMaxLength(form)&&validateRequired(form);
	} 

    function minlength() { 
    	//this.aa = new Array("CODE", "代码 长度应为2位！", new Function ("varName", "this.minlength='2';  return this[varName];"));
    }  

	function maxlength(){
		this.aa = new Array("CODE", "代码 长度大于10位！", new Function ("varName", "this.maxlength='10';  return this[varName];"));
		this.bb = new Array("NAME", "名称 长度大于50个汉字！", new Function ("varName", "this.maxlength='100';  return this[varName];"));
		
		this.dd = new Array("URL", "链接 长度大于400位！", new Function ("varName", "this.maxlength='400';  return this[varName];"));
	}
	
	function required(){
		this.aa = new Array("CODE", "代码 不能为空！", new Function ("varName", "this.nullable='false';  return this[varName];"));
		this.bb = new Array("NAME", "名称 不能为空！", new Function ("varName", "this.nullable='false';  return this[varName];"));
		this.cc = new Array("PARENTNAME", "上级功能点 不能为空！", new Function ("varName", "this.nullable='false';  return this[varName];"));
		this.dd = new Array("URL", "链接 不能为空！", new Function ("varName", "this.nullable='false';  return this[varName];"));
	}
</script>
</html:html>